if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
set(WEB "../babelweb" CACHE PATH "Path where the documentation will be stored for www.gpsbabel.org.")
- # If using a makefile generator WEB can be overridden on the make
- # command line, e.g. make gpsbabel.org WEB=/tmp. If not overridden on
- # the make command line, or not using a makefile generator, or if using
- # "cmake --build dir --target gpsbabel.org", then the cache variable
- # WEB will be used. The cache variable can be overridden in the usual
- # way when configuring, i.e. "cmake dir -DWEB:PATH=/tmp".
-
- # FIXME: Is overriding WEB on the make command line worth the trouble of
- # using configure_file to build a wrapper script?
-
- configure_file(${CMAKE_SOURCE_DIR}/tools/make_gpsbabel_org_wrapper.sh.in
- ${CMAKE_BINARY_DIR}/tools/make_gpsbabel_org_wrapper.sh
- @ONLY
- NEWLINE_STYLE LF)
add_custom_target(gpsbabel.org
- ${CMAKE_BINARY_DIR}/tools/make_gpsbabel_org_wrapper.sh
+ ${CMAKE_BINARY_DIR}/tools/make_gpsbabel_org.sh ${WEB} ${DOCVERSION}
DEPENDS gpsbabel gpsbabel.pdf)
endif()
!defined(WEB, var) {
WEB = ../babelweb
}
- # Allow WEB to be overridden when running make.
- # DOCVERSION must be overridden at qmake time as it also affects the object code.
- gpsbabel.org.commands += web=\$\${WEB:-$${WEB}};
- gpsbabel.org.commands += tools/make_gpsbabel_org.sh \"\$\${web}\" $$shell_quote($$DOCVERSION);
+ gpsbabel.org.commands += tools/make_gpsbabel_org.sh $$shell_quote($$WEB) $$shell_quote($$DOCVERSION);
} else {
gpsbabel.org.commands += echo "target gpsbabel.org is not supported for out of source builds.";
gpsbabel.org.commands += exit 1;